@import "react-js-diagrams.scss";
@import "open-color.scss";


:root {
  --corlor-node-boder: $oc-gray-4;
}

html, body, #editorRoot {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.accordion-boy-background {
  background: $oc-gray-5;
}

.fullscreen-enabled{
  .flow-editor-container {
    height : 100%;
    width : 100%;
  }
}

.fullscreen{
  flex: 1;
  display: flex;
  flex-direction: row;
}

.tooltip{
  z-index: 3147584647;
}

.flow-editor-container {
  flex: 1;
  display: flex;
  flex-direction: row;

  .stencil-panel{
    @extend .accordion-boy-background;
    flex: 0 0 8rem;
    flex-direction: column;
    padding: 0rem;
    display: inline-block;
    overflow: hidden;


    .nodes-panel {
      @extend .accordion-boy-background;
      flex: 0 0 0 0;
      display: flex;
      flex-direction: column;
      max-width: 10rem;
      padding: 0rem;

      .node-wrapper {
        flex: 0 0 auto;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1rem;

        .basic-node {
          width: 100px;
        }
      }
    }
  }

  .canvas{
    flex: 1;
    display: flex;
    flex-direction: column;

    .diagram-drop-container {
      flex: 1;
      display: flex;
      flex-direction: column;

      .react-js-diagrams-canvas {
        flex: 1;
        background: rgb(200, 200, 200);
      }
    }
  }

  .controls {
    flex: 0 0 20rem;
    max-width: 20rem;
    overflow: auto;
  }
}


// Diagram SASS
.port{
  background: rgb(0,192,255);
  &:hover,&.selected{
    border-color:rgb(0,192,255) !important;
    -webkit-filter: drop-shadow( 0 0 20px rgba(0,192,255,0.5));
  }
}

.basic-node {
  background-color: rgb(30,30,30);
  border-radius: 5px;
  font-family:Arial;
  color: white;
  border: solid 2px black;
  overflow: visible;
  font-size: 11px;
  box-shadow: 0 0 10px rgba(black,0.5);

  .title{
    background: rgba(black,0.3);
    display: flex;
    white-space: nowrap;
    >*{
      align-self: center;
    }

    .fa{
      padding: 5px;
      opacity: 0.2;
      cursor: pointer;

      &:hover{
        opacity: 1.0;
      }
    }

    .name{
      flex-grow: 1;
      padding: 5px 5px;
    }
  }

  .ports{
    display: flex;
    background-image: linear-gradient(rgba(black,0.1),rgba(black,0.2));

    .in, .out{
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }

    .in-port,.out-port{
      display: flex;
      margin-top: 1px;
      >*{
        align-self: center;
      }
      .name{
        padding: 0 5px;
      }
    }

    .out-port{
      justify-content: flex-end;
      .name{
        justify-content: flex-end;
        text-align: right;
      }
    }
  }
}

.canvas{
  .btn-toolbar{
    padding-left:10px;

    .ant-btn{
      margin:0px 0px 12px 8px;
    }
  }
}


.flow-item-description{
  position: relative;
  z-index: 2000001;
}

.react-js-diagrams-canvas{
  .scale-frame{
    width: 100%;
    height:100%;
    z-index: 2000000;
    border: 1px solid  var(--corlor-node-boder);
  }

  .polygon{
    .diamond{
      &:hover{
        stroke:rgb(150,150,150) !important;
      }
    }
  }

  .node-editor-button{
    .btn-circle{
      border-color: var(--corlor-node-boder);
    }
  }

  .remove {
    position: absolute;
    top: -18px;
    left: -18px;

    .ant-btn{
      background: none;
      height:20px;
      width:20px;
      border-radius:10px;
      padding:0px;
      margin-top:-410px;
      border-color: #868e96;
    }
  }

  .link {
    position: absolute;
    bottom: -10px;
    right: -45px;
    cursor: pointer;

    .link-button{
      background: none;
      height:20px;
      width:20px;
      border-radius:10px;
      padding:0px;
      margin-right:-16px;
      margin-bottom:-36px;
    }

  }
}

.answer{
  background-color: $oc-gray-4;
}

